package cn.usain.mapper;

import com.jiyun.common.pojo.home.Special;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SpecialsMapper {
    @Select("SELECT id FROM productCollection WHERE user_id = #{userId}")
    List<Integer> getCollectedProductIdsByUserId(@Param("userId") Integer userId);

    @Select("SELECT * FROM special WHERE id = #{productId}")
    Special getProductById(@Param("productId") Integer productId);
}
